package chai.ningning.tcp;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.SocketAddress;

public class ThirdServer {

    private ServerSocket server;
    private final String host = "1.0.0.58";
    private final int port = 55555;

    private void build(){
        try {
            server= new ServerSocket();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    private void bind(){
        try {
            SocketAddress endpoint = new InetSocketAddress(host,port);
            server.bind(endpoint);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
   // private Socket acc
    private void listen(){

    }
    private void start() {
        build();
        bind();
        listen();
    }

    public static void main(String[] args) {
        ThirdServer ts = new ThirdServer();
        ts.start();
    }

}
